package csel;

import java.io.IOException;

import csel.model.*;
import csel.controller.Controller;
import csel.view.*;

import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;

public class RunGame
{
	public static void main(String args[]) throws IOException
	{
		Logger logger;
		Model model;
		Controller gameController;
		Splasher splashView;

		/* setup logging */
		BasicConfigurator.configure();
		logger = Logger.getLogger("csel");
		logger.setLevel(Level.INFO);			// change this to DEBUG to increase verbosity
		
		logger.info(
			String.format("Working dir: %s\n", System.getProperty("user.dir")));

		model = new Model();

		splashView = new Splasher(model);
		splashView.init();
		splashView.setVisible(true);

		gameController = new Controller(model, splashView);

		gameController.construct(); // the most killer method in the world
	}
}
